1. Field of the Invention
The present invention relates to a controlled variable computing apparatus for an internal combustion engine that computes controlled variables, such as a fuel injection amount and an ignition timing, for each cylinder of a multi-cylinder internal combustion engine using a signal synchronized with the revolution of the internal combustion engine as a trigger.
2. Description of the Related Art
In general, it is required to optimally control a fuel injection amount, an ignition timing, and the like in accordance with an operating condition of an internal combustion engine such as an engine for an automobile. Therefore, there is provided a control unit (ECU) that uses a microcomputer.
This control unit stores a control program, in which there is described a processing routine for computing various kinds of controlled variables. These various kinds of controlled variables are computed in accordance with the stored control program and the control unit performs control based on the controlled variables.
This control program is mainly constructed from a main routine synchronized with an operating clock of the microcomputer and an interruption routine whose execution is triggered by a signal synchronized with the revolution of the internal combustion engine.
In order to appropriately compute the various kinds of controlled variables in accordance with the changing of the operating condition of the internal combustion engine, there are computed appropriate controlled variables if the computation is performed by the interruption routine that is executed in synchronism with the revolution of the internal combustion engine. Also, if a time interval between synchronized signals is shortened in accordance with the increase of the number of revolutions, the number of times of the computation is increased.
With a conventional technique, a signal synchronized with the revolution of the internal combustion engine is generated with a frequency with which the signal is generated around four times each time a crank makes one rotation.
In order to improve the accuracy of the fuel injection amount, the ignition timing, and the like, the frequency of generation of this signal is increased. For instance, the signal is generated each time the crank shaft rotates by a crank angle of 10xc2x0 and the control of a fuel injection valve, an ignition coil, and the like is performed using this signal. In this case, the time interval between signals synchronized with the revolution of the internal combustion engine is shortened in comparison with a conventional case and there is a danger that a time period taken to perform the processing in the interruption routine that is triggered by each signal exceeds a time period between preceding and succeeding signals.
Accordingly, even if the frequency of computation is increased, it is required to refrain from the execution of processing in the next main routine or processing in the next interruption routine until the processing in the interruption routine corresponding to one signal is ended. Consequently, it is impossible to realize control with good responsiveness that is synchronized with the revolution of the internal combustion engine.
In such a case, there may be conceived a method with which a processing routine is appropriately distributed so that it becomes possible to execute this processing routine between respective signals. In this case, however, there is apprehension that the control program becomes complicated. There may also be conceived a method with which the computation capability of the control unit is enhanced. However, there is apprehension that this method is disadvantageous from the viewpoint of cost. Consequently, it is required to perform the computation of controlled variables with efficiency.
In the case of a conventional controlled variable computing apparatus for an internal combustion engine that is, for instance, disclosed in JP 08-246942 A, one of a plurality of cylinders is determined as a reference cylinder, various kinds of controlled variables for this reference cylinder are computed in a main routine synchronized with an operating clock of a microcomputer, and results of this computation are set as basic controlled variables. In addition, as to the controlled variables for respective cylinders, computation for correcting these basic controlled variables is performed in an interruption routine that is triggered by a cylinder detection signal corresponding to each cylinder and there are calculated ultimate controlled variables.
With the conventional controlled variable computing apparatus for an internal combustion engine, as described above, the basic controlled variables for the reference cylinder are computed in the main routine synchronized with the operating clock of the microcomputer, so that there is a problem that it is difficult to cope with a sudden change of an operating state of the internal combustion engine.
The present invention has been made to solve the problems described above, and it is an object of the invention to provide a controlled variable computing apparatus for an internal combustion engine that is capable of appropriately controlling a fuel injection amount, an ignition timing, and the like in accordance with an operating state.
A controlled variable computing apparatus for an internal combustion engine according to the present invention includes, a revolution signal generating unit for outputting a revolution signal in synchronism with revolution of the internal combustion engine, and a control unit for computing a controlled variable for a control target each time the revolution signal is inputted. The control unit includes, a controlled variable computing unit for computing a driving timing and a driving time period for the control target at a point in time when the number of times of input of the revolution signal reaches a predetermined number, and a driving control unit for controlling the driving of the control target based on the driving timing and the driving time period each time the revolution signal is inputted, in which if the operation time period of the controlled variable computing unit overlaps the operation time period of the driving control unit, the driving control unit is prioritized to perform its operation by suspending an operation of the controlled variable computing unit.
With this construction, it becomes unnecessary to complete an operation of the controlled variable computing unit within a time period between signals synchronized with the revolution, there is not hindered an operation of the driving control unit, and it becomes possible to carry out control with good responsiveness while preventing a situation where a control program is complicated.